package com.wondertek.poms.dao.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/**
 * @author evan0213
 * @description
 */
@Data
@Entity
@Table(name = "POMS_EXPORT_LOG")
@DynamicUpdate
@DynamicInsert
@Proxy(lazy = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PomsExportLog {
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "POMS_EXPORT_LOG_SEQ")
	@SequenceGenerator(name = "POMS_EXPORT_LOG_SEQ", allocationSize = 1, sequenceName = "POMS_EXPORT_LOG_SEQ")
	private Long id;
	@Column(name = "POMS_ID")
	private Long pomsId;//type=1，节目ID；type=2，产品包ID；type=3，热点主题ID；type=4，位置ID
	@Column(name = "TYPE")
	private String type;//输出类型：1，节目；2，产品包；3，热点主题；4，位置
	@Column(name = "STATUS")
	private String status;//POMS内容状态：1，上线；0，下线
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "PUBLISH_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	private Date publishTime;//更新时间
	@Column(name = "PRD_INFO_ID")
	private Long prdInfoId;//产品包ID，仅type=1时使用
	@Column(name = "FORM_TYPE")
	private String formType;//剧集类型，仅type=1时使用
}
